package com.aksu.wiki.controller;

import com.aksu.wiki.domain.Demo;
import com.aksu.wiki.service.DemoService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
@RequestMapping("/demo")
public class DemoController {

    @Value("${demo.hello:TEST}")
    private String demoHello;

    @Resource
    private DemoService demoService;
    
    @GetMapping ("/list")
    public List<Demo> list(){

        return demoService.getList();
    }


}
